package com.waitingsnow.modules.shell
{
import com.waitingsnow.core.mvc.Facade;
import com.waitingsnow.modules.shell.controller.ShellCommand;
import com.waitingsnow.modules.shell.model.RubyServerProxy;
import com.waitingsnow.modules.shell.view.ShellView;

import flash.utils.Dictionary;

/**
 * 
 * @author waitingsnow
 * $Id: ShellFacade.as 2 2012-05-17 10:10:03Z cgslendy@gmail.com $
 */
public class ShellFacade extends Facade
{
	//==========================================================================
	//  Class variables
	//==========================================================================
	static private var instance:ShellFacade;
	
	//==========================================================================
	//  Class Methods
	//==========================================================================
	static public function getInstance():ShellFacade
	{
		if (!instance)
		{
			instance = new ShellFacade();
		}
		return instance;
	}
	
	//==========================================================================
	//  Methods
	//==========================================================================
	override public function startup(app:Object):void
	{
		super.startup(app);
	}
	
	override protected function initModel():void
	{
		addContent(new RubyServerProxy(), RubyServerProxy.NAME);
	}
	
	override protected function initView():void
	{
		var shellView:ShellView = new ShellView();
		addContent(shellView, ShellView.NAME);
		app.addChild(shellView);
	}
	
	override protected function initController():void
	{
		new ShellCommand();
	}
}
}